home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / rm08.zip / DEMO3.C < prev    next >
C/C++ Source or Header  |  1993-01-27  |  901b  |  32 lines

  1. /* ************************************************************ */
  2. /* Demo3.c For QuickC                                           */
  3. /*                                                              */
  4. /* QGCAR.XGF was created by saving the image as  QC/QB (Binary) */
  5. /* from Raster Master.                                           */
  6. /* ************************************************************ */
  7.  
  8. #include <graph.h>
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11.  
  12. void main()
  13. {
  14.   void *ImgBuf;
  15.   FILE *F;
  16.   size_t size;
  17.  
  18.   F=fopen("QGCAR.XGF","rb");
  19.   size =filelength(fileno(F));
  20.   ImgBuf = malloc(size);
  21.   fread(ImgBuf,size,1,F);
  22.   fclose(F);
  23.  
  24.   _setvideomode(_MRES16COLOR);    /* _MRES256COLOR for 256 color images */
  25.   _setcolor(1);
  26.   _rectangle(_GFILLINTERIOR,0,0,319,199);
  27.   _putimage(0,0,ImgBuf,_GPSET);
  28.   free(ImgBuf);
  29.   getch();
  30.   _setvideomode(_DEFAULTMODE);
  31. }
  32.